<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

/**
 * Class MeterType.
 *
 * @package namespace App\Models;
 */
class MeterType extends BaseModel implements Transformable
{
    use TransformableTrait;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['code', 'abbr', 'name', 'unit_price', 'unit', 'max_consumption', 'can_reset', 'reset_limit'];

    public function meterTypePriceLevels()
    {
        return $this->hasMany(MeterTypePriceLevel::class);
    }
}
